<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学生列表</title>
    <style>
        table {
            width: 100%;
            border-collapse: collapse;
        }

        th, td {
            padding: 10px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }

        th {
            background-color: #f2f2f2;
        }

        tr:hover {
            background-color: #f5f5f5;
        }

        .pagination {
            margin-top: 20px;
            text-align: center;
        }

        .pagination a {
            margin: 0 5px;
            padding: 8px 16px;
            text-decoration: none;
            border: 1px solid #ddd;
            color: #007bff;
        }

        .pagination a:hover {
            background-color: #ddd;
        }
    </style>
</head>
<body>
<h1>学生列表</h1>
<table>
    <thead>
    <tr>
        <th>ID</th>
        <th>姓名</th>
        <th>年龄</th>
        <th>性别</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="student : ${studentList.content}">
        <td th:text="${student.id}"></td>
        <td th:text="${student.Studentname}"></td>
        <td th:text="${student.Age}"></td>
        <td th:text="${student.Gender}"></td>
    </tr>
    </tbody>
</table>

<div class="pagination">
    <a th:if="${studentList.hasPrevious()}" th:href="@{'/student/page?start=' + ${studentList.number - 1} + '&size=' + ${studentList.size}}">上一页</a>
    <a th:if="${studentList.hasNext()}" th:href="@{'/student/page?start=' + ${studentList.number + 1} + '&size=' + ${studentList.size}}">下一页</a>
</div>
</body>
</html>
